<?php

// +----------------------------------------------------------------------
// | Copyright (c) 2020 All rights reserved.
// +----------------------------------------------------------------------
// | User: Simony <1362229026@qq.com>
// | wechat: Shen86579595
// +----------------------------------------------------------------------

namespace app\common\model\Member;

use app\common\model\Base;
use think\facade\Config;

class Level extends Base
{

    CONST ORDINARY_LEVEL = 0; //普通
    CONST VERIFIY_LEVEL = 1;//认证等级
    CONST VIP_LEVEL = 2;//vip等级

    protected $name = 'member_level';

    //使用权限
    CONST REAL_VERIFY = 'real_verify';

    //功能权限
    CONST VIEW_MEMBER_NUM = 'view_member_num'; //每天查看会员信息次数
    CONST VIEW_MEMBER_EFFECTIVE_TIME = 'view_member_effective_time'; //每次查看会员信息有效时间
    CONST DAY_VIEW_MEMBER_SOCIAL_ACCOUNT_NUM = 'day_view_member_social_account_num';
    CONST DAY_VIEW_MEMBER_SOCIAL_ACCOUNT_EFFECTIVE_TIME = 'day_view_member_social_account_effective_time';
    CONST DAY_VIEW_MEMBER_ALBUM_NUM = 'day_view_member_album_num'; //查看相册数量
    CONST DAY_VIEW_MEMBER_ALBUM_EFFECTIVE_TIME = 'day_view_member_album_effective_time';

    CONST READ_AFTER_BURN = 'read_after_burn'; //阅后即焚时间(秒)
    CONST DAY_RELEASE_DYNAMIC_NUM = 'day_release_dynamic_num'; //每天发布动态次数
    CONST DAY_RELEASE_PROGRAM_NUM = 'day_release_program_num'; //每天发布节目次数


//    /**
//     * User: Simony
//     * Function: 获取使用配置
//     * @param $name
//     * @return mixed
//     * @throws \think\Exception
//     * @throws \think\exception\PDOException
//     */
//    public function getUseAuth($name)
//    {
//        static $data = [];
//        if (isset($data[$name])) return $data[$name];
//        $level_use_auth = moduleConfig("level_use_auth");
//        $data = $level_use_auth;
//        return $data[$name];
//    }
//
//    /**
//     * User: Simony
//     * Function: 获取功能配置
//     * @param $name
//     * @return mixed
//     * @throws \think\Exception
//     * @throws \think\exception\PDOException
//     */
//    public function getFunctionAuth($name)
//    {
//        static $data = [];
//        if (isset($data[$name])) return $data[$name];
//        $level_use_auth = moduleConfig("level_auth");
//        $data = $level_use_auth;
//        return $data[$name];
//    }

}